package view
{
	import flash.display.BitmapData;
	import flash.display.Sprite;
	
	import map.ScrollMap;
	
	/**
	 * 基本游戏对象
	 */
	public class BaseObject
	{
		public var inuse:Boolean = false;
		private var layer:String;
		
		public function BaseObject()
		{
		}
		
		public function startUpBaseObject(layer:String):void {
			this.layer = layer;
			if(!this.inuse) {
				this.inuse = true;
				ScrollMap.Instance.layers[layer].gameObjManager.addBaseObject(this);
			}
		}
		
		public function shutDown():void {
			if(this.inuse) {
				this.inuse = false;
				ScrollMap.Instance.layers[layer].gameObjManager.removeBaseObject(this);
			}
		}
		
		public function enterFrame(dt:Number):void {
			
		}
		
		public function copyToBackBuffer(db:BitmapData):void
		{
			
		}
		
	}
}